#!/usr/bin/env node
const fs = require('fs');
const file = process.argv[2];
/*if(!fs.existsSync(file)){
  console.error(`${file} not exist!`);
  return;
}*/
fs.readFile(file,'utf8',(err,data)=>{
  if(err){
    console.error(`${file} not exist!`);
    return;
  }
  const lines = data.split('\n');
  /*for(const line of lines){
    console.log(line);
  }*/
  for(let i=1; i<lines.length;i++){
    console.log(`${i}\t${lines[i-1]}`);
  }
})

